using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SiteManager;
using System.Data.SqlClient;
/// <summary>
/// Summary description for ClsDoctor
/// </summary>
public class ClsDoctor:CInterface 
{

private int _Id;

	public int Id
	{
		get { return _Id;}
		set { _Id = value;}
	}
private string _UPin;

	public string UPin
	{
		get { return _UPin;}
		set { _UPin = value;}
	}

private int _SpecialityID;
                
	public int SpecialityID
	{
		get { return _SpecialityID;}
		set { _SpecialityID = value;}
	}
	
    private int _PrimarySpecialityID;

	public int PrimarySpecialityID
	{
		get { return _PrimarySpecialityID;}
		set { _PrimarySpecialityID = value;}
	}
	
private int _SecondarySpecialityID;

	public int SecondarySpecialityID
	{
		get { return _SecondarySpecialityID;}
		set { _SecondarySpecialityID = value;}
	}
	
private bool _Abms_CertificationID;

	public bool Abms_CertificationID
	{
		get { return _Abms_CertificationID;}
		set { _Abms_CertificationID = value;}
	}
	
private string _FName;

	public string FName
	{
		get { return _FName;}
		set { _FName = value;}
	}
    private string _MName;

	public string MName
	{
		get { return _MName;}
		set { _MName = value;}
	}
        private string _LName;

	public string LName
	{
		get { return _LName;}
		set { _LName = value;}
	}
    
    private string _Email	;

	public string Email	
	{
		get { return _Email	;}
		set { _Email	 = value;}
	}

    private string _Title	;

	public string Title	
	{
		get { return _Title	;}
		set { _Title	 = value;}
	}
private string _Password	;

	public string Password	
	{
		get { return _Password	;}
		set { _Password	 = value;}
	}

    private string _Phone	;

	public string Phone		
	{
		get { return _Phone	;}
		set { _Phone	 = value;}
	}
	
    private string _Fax;
                                    
	public string Fax
	{
		get { return _Fax;}
		set { _Fax = value;}
	}
private string _Address1;

	public string Address1
	{
		get { return _Address1;}
		set { _Address1 = value;}
	}
	
private string _Address2;

	public string Address2
	{
		get { return _Address2;}
		set { _Address2 = value;}
	}

private string _City	;

	public string City	
	{
		get { return _City	;}
		set { _City	 = value;}
	}

    private string _State	;

	public string State	
	{
		get { return _State	;}
		set { _State	 = value;}
	}

    
    private string _CountryId;

	public string CountryId
	{
		get { return _CountryId;}
		set { _CountryId = value;}
	}

private string _Languages;

	public string Languages
	{
		get { return _Languages;}
		set { _Languages = value;}
	}
    
private string _InsuranceIds	;

	public string InsuranceIds	
	{
		get { return _InsuranceIds	;}
		set { _InsuranceIds	 = value;}
	}
    private string _County;

	public string County
	{
		get { return _County;}
		set { _County = value;}
	}
    private string _Msa;

	public string Msa
	{
		get { return _Msa;}
		set { _Msa = value;}
	}
    private string _Cmsa;

	public string Cmsa
	{
		get { return _Cmsa;}
		set { _Cmsa = value;}
	}
    private string _ZipCode;

	public string ZipCode
	{
		get { return _ZipCode;}
		set { _ZipCode = value;}
	}
    private string _Gender;

	public string Gender
	{
		get { return _Gender;}
		set { _Gender = value;}
	}

    
    private int _MedicalSchool;

	public int MedicalSchool
	{
		get { return _MedicalSchool;}
		set { _MedicalSchool = value;}
	}

    private int _GraduationYear;

	public int GraduationYear
	{
		get { return _GraduationYear;}
		set { _GraduationYear = value;}
	}

    private string _HospitalName;

	public string HospitalName	
	{
		get { return _HospitalName	;}
		set { _HospitalName	 = value;}
	}

    private int _MajorActivityID;

	public int MajorActivityID
	{
		get { return _MajorActivityID;}
		set { _MajorActivityID = value;}
	}
	
    private string _Website	;

	public string Website	
	{
		get { return _Website	;}
		set { _Website	 = value;}
	}
    private int _ResidencyTraining	;

	public int ResidencyTraining	
	{
		get { return _ResidencyTraining	;}
		set { _ResidencyTraining	 = value;}
	}
	
    private string _GroupPractice	;

	public string GroupPractice	
	{
		get { return _GroupPractice	;}
		set { _GroupPractice	 = value;}
	}
    private DateTime _RegDate	;

	public DateTime RegDate	
	{
		get { return _RegDate	;}
		set { _RegDate	 = value;}
	}
    private bool _IsSubscribe	;

	public bool IsSubscribe	
	{
		get { return _IsSubscribe	;}
		set { _IsSubscribe	 = value;}
	}

    private DateTime _SubscriptionDate	;

	public DateTime SubscriptionDate	
	{
		get { return _SubscriptionDate	;}
		set { _SubscriptionDate	 = value;}
	}

    
    private bool _IsDelete;

	public bool IsDelete
	{
		get { return _IsDelete;}
		set { _IsDelete = value;}
	}

    private string _Fellowship	;

	public string Fellowship	
	{
		get { return _Fellowship	;}
		set { _Fellowship	 = value;}
	}

    
    private string _AdvancedTraining	;

	public string AdvancedTraining	
	{
		get { return _AdvancedTraining	;}
		set { _AdvancedTraining	 = value;}
	}
    private string _Awards;

	public string Awards
	{
		get { return _Awards;}
		set { _Awards = value;}
	}

    private bool _IsBulk;

	public bool IsBulk
	{
		get { return _IsBulk;}
		set { _IsBulk = value;}
	}
    private bool _AcceptNew;

	public bool AcceptNew
	{
		get { return _AcceptNew;}
		set { _AcceptNew = value;}
	}
    private int _Cost;

	public int Cost
	{
		get { return _Cost;}
		set { _Cost = value;}
	}
    private DateTime _accessprofiledate	;

	public DateTime accessprofiledate	
	{
		get { return _accessprofiledate	;}
		set { _accessprofiledate	 = value;}
	}
    private string _zipcodeforsearch	;

	public string zipcodeforsearch	
	{
		get { return _zipcodeforsearch	;}
		set { _zipcodeforsearch	 = value;}
	}
    private int _FeatureDocTypeId	;

	public int FeatureDocTypeId	
	{
		get { return _FeatureDocTypeId	;}
		set { _FeatureDocTypeId	 = value;}
	}
	
	public ClsDoctor()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    




    #region CInterface Members

    public int Add()
    {
        Manager objManager = new Manager(true,"ConnectionString");
     //   int iresult = 0;
        SqlParameter[] sqlparam = new SqlParameter[48];
        sqlparam[0] = new SqlParameter("@Id", SqlDbType.BigInt);
        sqlparam[0].Value = 0;
        sqlparam[1] = new SqlParameter("UPin",_UPin);
        sqlparam[2] = new SqlParameter("@SpecialityID",_SpecialityID);
        sqlparam[3] = new SqlParameter("@PrimarySpecialityID", _PrimarySpecialityID);
        sqlparam[4] = new SqlParameter("@SecondarySpecialityID",_SecondarySpecialityID);
        sqlparam[5] = new SqlParameter("@Abms_CertificationID", _Abms_CertificationID);
        sqlparam[6] = new SqlParameter("@FName", _FName);
        sqlparam[7] = new SqlParameter("@MName", _MName);
        sqlparam[8] = new SqlParameter("@LName", _LName);
        sqlparam[9] = new SqlParameter("@Email", _Email);
        sqlparam[10] = new SqlParameter("@Title", _Title);
        sqlparam[11] = new SqlParameter("@Password", _Password);
        sqlparam[12] = new SqlParameter("@Phone", _Phone);
        sqlparam[13] = new SqlParameter("@Fax", _Fax);
        sqlparam[14] = new SqlParameter("@Address1", _Address1);
        sqlparam[15] = new SqlParameter("@Address2", _Address2);
        sqlparam[16] = new SqlParameter("@City", _City);
        sqlparam[17] = new SqlParameter("@State", _State);
        sqlparam[18] = new SqlParameter("@CountryId", _CountryId);
        sqlparam[19] = new SqlParameter("@SpecialityID", _SpecialityID);
        sqlparam[20] = new SqlParameter("@Languages", _Languages);
        sqlparam[21] = new SqlParameter("@InsuranceIds", _InsuranceIds);
        sqlparam[22] = new SqlParameter("@County", _CountryId);
        sqlparam[23] = new SqlParameter("@Msa", _Msa);
        sqlparam[24] = new SqlParameter("@Cmsa", _Cmsa);
        sqlparam[25] = new SqlParameter("@ZipCode", _ZipCode);
        sqlparam[26] = new SqlParameter("@Gender", _Gender);
        sqlparam[27] = new SqlParameter("@MedicalSchool", _MedicalSchool);
        sqlparam[28] = new SqlParameter("@GraduationYear", _GraduationYear);
        sqlparam[29] = new SqlParameter("@HospitalName", _HospitalName);
        sqlparam[30] = new SqlParameter("@MajorActivityID", _MajorActivityID);
        sqlparam[31] = new SqlParameter("@Website", _Website);
        sqlparam[32] = new SqlParameter("@ResidencyTraining", _ResidencyTraining);
        sqlparam[33] = new SqlParameter("@GroupPractice", _GroupPractice);
        sqlparam[34] = new SqlParameter("@RegDate", _RegDate);
        sqlparam[35] = new SqlParameter("@IsSubscribe", _IsSubscribe);
        sqlparam[36] = new SqlParameter("@SubscriptionDate", _SubscriptionDate);
        sqlparam[37] = new SqlParameter("@IsDelete", _IsDelete);
        sqlparam[38] = new SqlParameter("@Fellowship", _Fellowship);
        sqlparam[39] = new SqlParameter("@AdvancedTraining", _AdvancedTraining);
        sqlparam[40] = new SqlParameter("@Awards", _Awards);
        sqlparam[41] = new SqlParameter("@IsBulk", _IsBulk);
        sqlparam[42] = new SqlParameter("@AcceptNew", _AcceptNew);
        sqlparam[43] = new SqlParameter("@Cost", _Cost);
        sqlparam[44] = new SqlParameter("@accessprofiledate", _accessprofiledate);
        sqlparam[45] = new SqlParameter("@zipcodeforsearch", _zipcodeforsearch);
        sqlparam[46] = new SqlParameter("@FeatureDocTypeId", _FeatureDocTypeId);
        sqlparam[47] = new SqlParameter("@Result", SqlDbType.BigInt);
        sqlparam[47].Direction = ParameterDirection.Output;
        objManager.ExecuteUpdate("[DoctorRegistration]", sqlparam);
        return Convert.ToInt32(sqlparam[47].Value);


    //    return iresult;
    }
    public void FormValidation(string fname)
    {
        Validation ObjValidation= new Validation();
        ObjValidation.AddValidation(_FName, Validation.ValidationCommand.required, "Enter First Name", "");
    }

    public void Delete()
    {
        throw new Exception("The method or operation is not implemented.");
    }

    #endregion

    
}
